//setup ui
function initUI() {
    print("init...");
    mainWnd.setNavagationTitle("Navagation");
    var id = mainWnd.addNavagationGroup("Layers");
    mainWnd.addNavagationCheck("Terrain", id);
    mainWnd.addNavagationCheck("Building", id);
    mainWnd.addNavagationCheck("Street", id);
    mainWnd.addNavagationCheck("River", id);
    mainWnd.addNavagationCheck("Flag", id);
    id = mainWnd.addNavagationGroup("Quick Entry");
    mainWnd.addNavagationFunction("Load Model", id);
    mainWnd.addNavagationFunction("Unload All", id);

}
//connect actions
function initActions() {
    var btn = mainWnd.findChild("pushButtonTest");
    btn["clicked()"].connect(
    function () {
        print('Disable it');
    });
    var about = mainWnd.findChild("action_A");
    about["triggered()"].connect(
    function () {
        mainWnd.showMessage("Info", "OSGIS DEMO");
    }
    );
    mainWnd["checkChanged(QString, bool)"].connect(
    function (name, checked) {
        print(name);
        print(checked);
    }
    )
    mainWnd.enableNavagation(true);
}

initUI();
initActions();